﻿using UnityEngine;
using System.Collections;

public class CamFollow : MonoBehaviour {

	public float Distance = 10f;

	// Use this for initialization
	void Start () {

	}
	
	// Update is called once per frame
	void Update () {

		Vector3 PlayerPOS = GameObject.Find ("Player").transform.position;
		GameObject.Find ("MainCamera").transform.position = new Vector3 (PlayerPOS.x, 0, PlayerPOS.z - Distance);
	
	}
}
